package main

func moveZeroes(nums []int)  {
	zeroCount := 0
	for i := 0; i < len(nums) - zeroCount; {
		if nums[i] == 0 {
			zeroCount++
			copy(nums[i:], nums[i+1:])
		} else {
			i++
		}
	}
	for i := len(nums) - zeroCount; i < len(nums); i++ {
		nums[i] = 0
	}
}

func main() {
	arr := []int{0}
	moveZeroes(arr)
	println(arr)
}